3.1 \(\int (a+i a \cot (c+d x))^n \, dx\)

Optimal. Leaf size=49 \[ \frac {i (a+i a \cot (c+d x))^n \, _2F_1\left (1,n;n+1;\frac {1}{2} (i \cot (c+d x)+1)\right )}{2 d n} \]

[Out]

1/2*I*(a+I*a*cot(d*x+c))^n*hypergeom([1, n],[1+n],1/2+1/2*I*cot(d*x+c))/d/n

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {3481, 68} \[ \frac {i (a+i a \cot (c+d x))^n \, _2F_1\left (1,n;n+1;\frac {1}{2} (i \cot (c+d x)+1)\right )}{2 d n} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Cot[c + d*x])^n,x]

[Out]

((I/2)*(a + I*a*Cot[c + d*x])^n*Hypergeometric2F1[1, n, 1 + n, (1 + I*Cot[c + d*x])/2])/(d*n)

Rule 68

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((b*c - a*d)^n*(a + b*x)^(m + 1)*Hype
rgeometric2F1[-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b^(n + 1)*(m + 1)), x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 3481

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Dist[b/d, Subst[Int[(a + x)^(n - 1)/(a - x), x]
, x, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 + b^2, 0]

Rubi steps

\begin {align*} \int (a+i a \cot (c+d x))^n \, dx &=\frac {(i a) \operatorname {Subst}\left (\int \frac {(a+x)^{-1+n}}{a-x} \, dx,x,i a \cot (c+d x)\right )}{d}\\ &=\frac {i (a+i a \cot (c+d x))^n \, _2F_1\left (1,n;1+n;\frac {1}{2} (1+i \cot (c+d x))\right )}{2 d n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.32, size = 117, normalized size = 2.39 \[ \frac {i (a+i a \cot (c+d x))^n \left (2 (n+1) \, _2F_1(1,n;n+1;i \cot (c+d x)+1)+(n+i n \cot (c+d x)) \left (\, _2F_1\left (1,n+1;n+2;\frac {1}{2} (i \cot (c+d x)+1)\right )-2 \, _2F_1(1,n+1;n+2;i \cot (c+d x)+1)\right )\right )}{4 d n (n+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Cot[c + d*x])^n,x]

[Out]

((I/4)*(a + I*a*Cot[c + d*x])^n*(2*(1 + n)*Hypergeometric2F1[1, n, 1 + n, 1 + I*Cot[c + d*x]] + (n + I*n*Cot[c
 + d*x])*(Hypergeometric2F1[1, 1 + n, 2 + n, (1 + I*Cot[c + d*x])/2] - 2*Hypergeometric2F1[1, 1 + n, 2 + n, 1
+ I*Cot[c + d*x]])))/(d*n*(1 + n))

________________________________________________________________________________________

fricas [F]  time = 0.86, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\left (-\frac {2 \, a}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}\right )^{n}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*cot(d*x+c))^n,x, algorithm="fricas")

[Out]

integral((-2*a/(e^(2*I*d*x + 2*I*c) - 1))^n, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (i \, a \cot \left (d x + c\right ) + a\right )}^{n}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*cot(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((I*a*cot(d*x + c) + a)^n, x)

________________________________________________________________________________________

maple [F]  time = 2.50, size = 0, normalized size = 0.00 \[ \int \left (a +i a \cot \left (d x +c \right )\right )^{n}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*cot(d*x+c))^n,x)

[Out]

int((a+I*a*cot(d*x+c))^n,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (i \, a \cot \left (d x + c\right ) + a\right )}^{n}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*cot(d*x+c))^n,x, algorithm="maxima")

[Out]

integrate((I*a*cot(d*x + c) + a)^n, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int {\left (a+a\,\mathrm {cot}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^n \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*cot(c + d*x)*1i)^n,x)

[Out]

int((a + a*cot(c + d*x)*1i)^n, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (i a \cot {\left (c + d x \right )} + a\right )^{n}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*cot(d*x+c))**n,x)

[Out]

Integral((I*a*cot(c + d*x) + a)**n, x)

________________________________________________________________________________________